package com.fingard.dsp.bank.reqrespobj.recrefund;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.text.StringHelper;

import java.util.HashMap;

/**
 * 代扣退款查询请求
 *
 * @author Cruise
 * @version 1.0
 * @date 2018/4/4
 */
public class ReqQryRecRefund extends RequestBase {
    /**
     * 商户账号
     */
    public String ownAct = "";

    /**
     * 退款流水号
     */
    public String refundNo = "";

    /**
     * 原商户订单号
     */
    public String oriRdSeq = "";

    /**
     * 原渠道方订单号
     */
    public String oriOppOrderNo = "";

    /**
     * 订单类型
     */
    public String orderType;

    //PayDate（退款提交日期）
    public String payDate;

    //PayDate（退款提交日期）
    public String paySentDate;

    /**
     * 退款提交时间
     */
    public String refundSentDate;

    public ReqQryRecRefund(HashMap<String, String> p_hashMap, ReqRespHeader p_header) throws Exception {
        reqHeader = p_header;

        if (p_hashMap.containsKey("OurBankAccount")) {
            ownAct = p_hashMap.get("OurBankAccount");
            if (StringHelper.isNullOrEmpty(ownAct)) {
                ownAct = "";
            }
        }
        if (p_hashMap.containsKey("RefundNo")) {
            refundNo = p_hashMap.get("RefundNo");
            if (StringHelper.isNullOrEmpty(refundNo)) {
                refundNo = "";
            }
        }
        if (p_hashMap.containsKey("OriRdSeq")) {
            oriRdSeq = p_hashMap.get("OriRdSeq");
            if (StringHelper.isNullOrEmpty(oriRdSeq)) {
                oriRdSeq = "";
            }
        }
        if (p_hashMap.containsKey("PayDate")) {
            payDate = p_hashMap.get("PayDate");
            if (StringHelper.isNullOrEmpty(payDate)) {
                payDate = "";
            }
        }

        if (p_hashMap.containsKey("PaySentDate")) {
            paySentDate = p_hashMap.get("PaySentDate");
            if (StringHelper.isNullOrEmpty(paySentDate)) {
                paySentDate = "";
            }
        }

        if (p_hashMap.containsKey("OrderType")) {
            orderType = p_hashMap.get("OrderType");
            if (StringHelper.isNullOrEmpty(orderType)) {
                orderType = "";
            }
        }

        if (p_hashMap.containsKey("RefundSentDate")) {
            refundSentDate = p_hashMap.get("RefundSentDate");
            if (StringHelper.isNullOrEmpty(refundSentDate)) {
                refundSentDate = "";
            }
        }

    }
}
